import requests
import tcsy.login as login
import tcsy.account as account

session = requests.session()

if __name__ == "__main__":
    domain = 'http://localhost:8080'
    result = login.login(session, domain, 'tony', '123456')
    # 如果登录失败，就终止程序
    if not result:
        exit()

    '''
    开始测试业务
    '''
    account.test_account_delete(session, domain)
    # 测试账户列表
    account.test_account_list(session, domain)

